/* enum */
import ComponentNameEnum from '@model/enum/ComponentNameEnum'
/* image */
// @ts-ignore
import { getOssUrl } from '@src/util/assets'
const NoPermissionImage = getOssUrl('/403.png') 
/* vue */
import VC from '@model/VC'
import { Component, Emit, Prop, Ref } from 'vue-property-decorator'
import { CreateElement } from 'vue'
/* scss */
import '@src/component/common/BaseErrorPage/BaseErrorPageNoPermission.scss'

@Component({ 
  name: ComponentNameEnum.BaseErrorPageNoPermission
})
export default class BaseErrorPageNoPermission extends VC {
  /* 显示的文字 */
  @Prop() readonly text: string | undefined
  
  private getClassName(className: string): string {
    return `${ComponentNameEnum.BaseErrorPageNoPermission}-${className}`
  }
  
  render(h: CreateElement) {
    return (
      <div class={ComponentNameEnum.BaseErrorPageNoPermission}>
        <div class={this.getClassName('image')}>
          <img src={NoPermissionImage} />
        </div>
        <div class={this.getClassName('text')}>
          { this.text }
        </div>
      </div>
    )
  }
}

